package com.stephen.mymall.enums;

import lombok.Getter;


/**
 * @ author: stephen
 * @ create: 2020-03-17 20:55
 * @ description: 返回结果枚举
 **/
@Getter
public enum ResultEnum {

    SUCCESS(0,"成功"),
    SYSTEM_ERROR(10001,"系统错误"),

    // 用户异常
    USER_HAS_EXIST(11001,"用户名已存在"),
    REGISTER_ERROR(11002,"注册失败"),
    INVALID_PARAMS(11002,"参数校验异常"),
    ;

    private Integer code;

    private String description;

    ResultEnum(Integer code, String description) {
        this.code = code;
        this.description = description;
    }}
